<?php
/**
 * 云打印平台，打印机二维码
 * @author lss
 * 2017-08-14
 */
namespace soa\mp;

use soa\client;

class agentQRCode  extends client
{
    /**
     * 服务地址
     * @var string
     */
    public $service_url = 'http://mp.kuaidihelp.com/';

    /**
     * 服务名称
     * @var string
     */
    protected $service_name = 'kuaidihelp_mp';

	//创建agent二维码
	public function create($agentGuid,$platform = "weixin_shop_36"){
		return $this->post("api/agentQRCode/create",compact('agentGuid','platform'));
	}

	//添加agent二维码链接
	public function insert($sceneId,$agentGuid,$url,$info = [],$platform = "weixin_shop_36"){
		return $this->post("api/agentQRCode/insert",compact('agentGuid','sceneId','url','info','platform'));
	}

	//根据scene_id获取二维码
	public function getBySceneId($sceneId,$platform = "weixin_shop_36"){
		return $this->post("api/agentQRCode/getBySceneId",compact('sceneId','platform'));
	}

	//根据agent获取二维码
	public function getByAgent($agentGuid,$platform = "weixin_shop_36"){
		return $this->post("api/agentQRCode/getByAgent",compact('agentGuid','platform'));
	}

	//获取二维码的scene_id
	public function getSceneId($platform = "weixin_shop_36"){
		return $this->post("api/agentQRCode/getSceneId",compact('platform'));
	}
}